import request from "@/utils/requestEncrypt";
import { UserForm } from "./user";

const USER_BASE_URL = "/ams/admin/user";
const MOCK_BASE_URL = "/api/mock/v1";
const UserAPI = {
  /**
   * 获取当前登录用户信息
   *
   * @returns 登录用户昵称、头像信息，包括角色和权限
   */

  Test(data: UserForm) {
    return request({
      url: `${USER_BASE_URL}/demo`,
      method: "post",
      data: data,
    });
  },

  mockTest() {
    return request({
      url: `${MOCK_BASE_URL}/users/me`,
      method: "get",
    });
  },
};

export default UserAPI;
